home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Graphics Plus
/
Graphics Plus.iso
/
msdos
/
editors
/
chiaro
/
bats.doc
next >
Wrap
Text File
|
1993-03-12
|
9KB
|
253 lines
DIRGIF.BAT 1.0 and ONEGIF.BAT 2.0
=================================
James W. Birdsall
03/19/93
0. CONTENTS
-----------
0. CONTENTS
1. INTRODUCTION
1.1 Quick Reference
1.2 Copyright, License, and Warranty Disclaimer
2. USAGE
2.1 dirgif.bat
2.2 onegif.bat
3. OUTPUT
4. TECHNICAL DETAILS
5. THE END
1. INTRODUCTION
---------------
These two batch files provide a convenient interface to the GIFCHECK
and GIFSTRIP programs, allowing easy batch processing of a directory and
logging of output to a file. ONEGIF.BAT requires that GIFCHECK.EXE and
GIFSTRIP.EXE be in the current directory or in the path. DIRGIF.BAT
requires that ONEGIF.BAT be in the current directory or in the path.
These batch files work under PC-DOS 3.3, and should work under MS-DOS
3.3 and PC/MS-DOS 4.0/4.01/5.0. They may not work with earlier versions
of DOS. Check your DOS documentation to see if the "CALL" function is
provided for batch files. If it is not present, DIRGIF.BAT will not
work, but ONEGIF.BAT should still work.
1.1 Quick Reference
-------------------
DIRGIF directory logfile
ONEGIF filename logfile
The log file does not need to exist already, but if it does, the new
output will be appended to the end of the present contents. Note that
for DIRGIF, the directory name should NOT have a trailing backslash
(i.e. C:\NEWGIFS is correct, but C:\NEWGIFS\ is not).
1.2 Copyright, License, and Warranty Disclaimer
-----------------------------------------------
The Graphics Interchange Format(c) is the Copyright property of
CompuServe Incorporated. GIF(sm) is a Service Mark property of
CompuServe Incorporated.
DIRGIF.BAT and ONEGIF.BAT are not in the public domain. They are
copyright 1993 by James W. Birdsall, all rights reserved.
The following license applies to the entire Chiaro suite, which is
made up of all the files listed in the file MANIFEST. Permission is
granted to do the following:
You may freely redistribute this archive, so long as it contains
all the files listed in the file MANIFEST, intact and
unmodified.
You may use the programs contained in this archive for a period
of 30 days for evaluation purposes.
Payment of the $10 shareware fee (which covers all the programs in
the Chiaro suite) licenses you to use the Chiaro suite beyond the
evaluation period. This license-to-use specifically includes use by
bulletin board systems and other commercial or private information
services.
Registered users will also receive update notices and bug reports,
and are entitled to use future versions without further payment.
The contents of the distribution archive, and all other related
files, information, and services are provided "as is" and without
warranty. To the extent permitted by applicable law, the author
disclaims all warranties, express or implied, including but not limited
to, any implied warranty of merchantability or fitness for a particular
purpose. While effort has been made to ensure that the files,
information, and services are accurate and correct, the author shall not
be liable for damages arising out of the use of or inability to use this
product, including but not limited to, loss of profit, data, or use of
this software, or special, incidental, or consequential damages or other
similar claims, even if the author has been specifically advised of the
possibility of such damages. Some states do not allow the exclusion of
incidental or consequential damages, so the foregoing limitation may not
apply to you.
Information on contacting the author is provided at the end of this
file.
2. USAGE
--------
2.1 dirgif.bat
--------------
DIRGIF.BAT is called with a directory name and a logging file name,
as shown in the quick reference (1.1). All files ending in .GIF in the
given directory are processed. Output is appended to the end of the
logging file.
Note that the directory name should not end with a backslash. This
leads to a few operational idiosyncracies. For example, a drive
specifier alone, such as "d:", will always mean the root directory of
that drive. To indicate the current directory of a drive, use "drive:.".
Note that GIFSTRIP by default writes out the stripped file before
removing the old file. This means that if any files need to be stripped,
the order of the files in the directory will change while DIRGIF.BAT is
going through the directory. Files will never be skipped, but some files
may be processed more than once. If this is a problem, changing
ONEGIF.BAT to use the "-o" option with GIFSTRIP should stop this
behavior.
2.2 onegif.bat
--------------
ONEGIF.BAT is called with a GIF file name and a logging file name, as
shown in the quick reference (1.1). It is called by DIRGIF.BAT but may
be used directly as well. ONEGIF.BAT calls GIFCHECK on the given GIF
file. If the file is OK, or an error is encountered, the filename and a
remark are appended to the logging file. The remark depends on the
errorlevel returned by GIFCHECK. If the file needs to be stripped (also
indicated by the errorlevel of GIFCHECK), GIFSTRIP is called. The
errorlevel returned by GIFSTRIP is then checked, and the filename and an
appropriate remark are appended to the logging file.
3. OUTPUT
---------
The output of GIFCHECK and GIFSTRIP is not logged.
A one-line entry is recorded for each file processed by ONEGIF.BAT.
Each entry is of the form "filename : remark". The possible remarks are:
unrecognized ERRORLEVEL!
GIFCHECK returned an unknown errorlevel. Something is very wrong.
GIF OK
The GIF file was correct and did not need stripping.
not a GIF
The file was not recognized as a GIF file.
GIF with unexpected EOF
The GIF file is corrupted.
ERROR!
GIFCHECK suffered an error while processing the file.
stripped OK
GIFSTRIP stripped the file OK.
error while stripping
GIFSTRIP reported an error. Something is very wrong.
4. TECHNICAL DETAILS
--------------------
ONEGIF.BAT calls GIFCHECK with the -b BATCH option.
This means that
1) GIFCHECK will decode the file to ensure that all the image data
is correct. This process can take some time for large files.
2) GIFCHECK will search through a file for the GIF signature if
there isn't one at the very beginning. This allows it to
recognize GIF files that have been processed on Macintosh
computers or have otherwise acquired junk at the beginning of
the file. (However, this also means that it will mistake a
text file containing the strings "GIF87a" or "GIF89a" for a
very corrupt GIF file, but that shouldn't be a big problem.)
3) GIFCHECK will report errors if any VIOLATIONS or ANOMALIES are
detected. See GIFCHECK.DOC for definition of these conditions.
ONEGIF.BAT calls GIFSTRIP with the -b BATCH and -n NOSTRICT options,
and possibly the -m MAC option depending on the results of GIFCHECK.
This means that
1) GIFSTRIP uses whatever RAM is available for temporary storage
before it uses disk space. See GIFSTRIP.DOC for a discussion of
the potential problems with this.
2) GIFSTRIP does not enforce strict format compliance. See
GIFSTRIP.DOC for a list of the common but unimportant format
violations which strict format compliance detects.
3) GIFSTRIP will write the stripped file before removing the old
file. This can cause trouble if there is not enough disk space,
and can cause DIRGIF.BAT to process some files twice, but it is
safer than removing the old file first.
4) If GIFCHECK detected leading junk in the file, GIFSTRIP will
remove the leading junk (and any trailing junk).
To change the options which ONEGIF.BAT uses for GIFCHECK or GIFSTRIP,
you may modify the batch file using any text editor or word processor
which can read and write plain-ASCII files. Note especially that the
batch file must be written out in plain-ASCII format, or it will not
work any more.
5. THE END
----------
Technical support via email is available from the following addresses:
INTERNET (the following are alternate addresses for the same place):
support@picarefy.com
picarefy!support@amc.com
picarefy!support@netcom.com
uunet!uw-coco!amc-gw!picarefy!support
COMPUSERVE:
71261,1731
GENIE:
J.BIRDSALL2
Registrations should be sent to:
James W. Birdsall
11112 NE 124 LN #D204
Kirkland, WA 98034
If you have an email address on any of the networks listed above,
please include it when registering. It is much easier to send updates by
email. Also, please specify what sort of archive (ZIP, ZOO, ARC, LZH,
ARJ, UNIX shar) you can handle most easily.
NOTE: IF YOU DO NOT PROVIDE AN EMAIL ADDRESS, YOU WILL ONLY RECEIVE
MAJOR VERSION UPDATES. YOU WILL NOT RECEIVE MINOR VERSIONS. PLEASE
PROVIDE AN EMAIL ADDRESS IF YOU HAVE ANY WAY OF DOING SO.